package app.server.project.main.service.dto.cms;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class OnlineDto {


    private String nT;

    private int num;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSSXXX", timezone = "Asia/Shanghai")
    private Date bT;

    public static OnlineDto of(String nT, int num, Date bT) {
        OnlineDto onlineDto = new OnlineDto();
        onlineDto.setNT(nT);
        onlineDto.setNum(num);
        onlineDto.setBT(bT);
        return onlineDto;
    }
}
